﻿
using System.Collections.Generic;
using DotNetNeural.Data.Base;
namespace DotNetNeural.Data.Learning
{
    /// <summary>
    /// Represents interface for training set of neural network
    /// </summary>
    public interface ITrainingSet
    {
        /// <summary>
        /// Gets inputs count for training set. Each item in training set
        /// must have this inputs count
        /// </summary>
        int InputsCount { get;  }

        /// <summary>
        /// Gets outputs count for training set. Each item in training set
        /// must have this outputs count
        /// </summary>
        int OutputsCount { get; }

        /// <summary>
        /// Add item into training set.
        /// </summary>
        /// <param name="item">Item to be added</param>
        /// <param name="isReserved">Flag indicating that item should be treated as control set item</param>
        void AddItem(TrainingSetItem item, bool isReserved);

        /// <summary>
        /// Add items into training set
        /// </summary>
        /// <param name="items">Items to be added</param>
        /// <param name="isReserved">Flag indicating that items should be treated as control set items</param>
        void AddItems(IEnumerable<TrainingSetItem> items, bool isReserved);

        /// <summary>
        /// Creates new iterator to iterate this training set
        /// </summary>
        /// <param name="useControlItems">If true then iterates through control items</param>
        Iterator<TrainingSetItem> CreateIterator(bool useControlItems);

        /// <summary>
        /// Gets control items
        /// </summary>
        IEnumerable<TrainingSetItem> ControlItems { get; }

        /// <summary>
        /// Gets learning items
        /// </summary>
        IEnumerable<TrainingSetItem> LearningItems { get; }
    }
}
